home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
GAMES
/
WALKER2
/
!Walker2
/
INTRO
/
WIntro
< prev
Wrap
Text File
|
1995-02-14
|
6KB
|
494 lines
;************************
;* WALKER II *
;* By Nicholas Kingsley *
;************************
ALIGN
#type &0
#base &20000
#exec &20000
#load &20000
#name Intro
; Variables
#set SpriteSize=65536 ; Sprite buffer size
#set LongDelay=&100 ; Delay between fade up & fade down
#set yp=15 ; Text Y Pos
ALIGN
B Walker_Intro
; The intro sequence
ALIGN
.Walker_Intro
STMFD R13!,{R0-R12,R14}
ADR R0,set_mode
MOV R1,#2
SWI OS_WriteN
SWI OS_RemoveCursors ; Switch of cursor
; Prepare sprite area
MOV R0,#9+256
ADR R1,spritearea
SWI OS_SpriteOp
; Load sprites
MOV R0,#10+256
ADR R1,spritearea
ADR R2,filename
SWI OS_SpriteOp
; * FADE 1 *
BL fade1
MOV R4,#1 ; Fade Up
BL FadeUpDown
BL LDelay
MOV R4,#0 ; Fade Down
BL FadeUpDown
; * FADE 2 *
BL fade2
MOV R4,#1 ; Fade Up
BL FadeUpDown
BL LDelay
MOV R4,#0 ; Fade Down
BL FadeUpDown
; * FADE 3 *
BL fade3
MOV R4,#1 ; Fade Up
BL FadeUpDown
BL LDelay
MOV R4,#0 ; Fade Down
BL FadeUpDown
;* FADE 4 *
BL fade4
MOV R4,#1 ; Fade Up
BL FadeUpDown
BL LDelay
MOV R4,#0 ; Fade Down
BL FadeUpDown
;*****************
;* TITLE SPRITES *
;*****************
;Store WALKER sprites X & Y values
MOV R0,#0
MOV R1,#960
STR R0,sx
STR R1,sy
.loop1
MOV R0,#34+256
ADR R1,spritearea
ADR R2,spritename1
LDR R3,sx
LDR R4,sy
MOV R5,#0
SWI OS_SpriteOp
MOV R0,#19
SWI OS_Byte
SUB R4,R4,#4
STR R4,sy
CMP R4,#648-128-8
BNE loop1
; * Now for the I's
MOV R0,#0-64
MOV R1,#1024
STR R0,sx
STR R1,sy
.loop3
MOV R0,#34+256
ADR R1,spritearea
ADR R2,spritename2
LDR R3,sx
MOV R4,#0
MOV R5,#0
SWI OS_SpriteOp
MOV R0,#34+256
ADR R1,spritearea
ADR R2,spritename2
LDR R3,sy
MOV R4,#0
MOV R5,#0
SWI OS_SpriteOp
LDR R0,sx
LDR R1,sy
ADD R0,R0,#4
SUB R1,R1,#4
STR R0,sx
STR R1,sy
CMP R0,#348+16
BNE loop3
MOV R0,#1
MOV R1,#&FFF1
MOV R2,#10240
MOV R3,#100
SWI Sound_Control
BL LDelay
; Clear screen !
MOV R0,#12
SWI OS_WriteC
BL fade5
MOV R4,#1 ; Fade Up
BL FadeUpDown
BL LDelay
MOV R4,#0 ; Fade Down
BL FadeUpDown
LDMFD R13!,{R0-R12,R15}
;************
;* FADE ADR *
;************
ALIGN
.fade1
STMFD R13!,{R14}
ADR R0,intro1
ADR R7,introd1
LDR R3,[R7,#0]
LDR R1,[R7,#1]
LDR R2,[R7,#2]
LDMFD R13!,{R15}
.fade2
STMFD R13!,{R14}
ADR R0,intro2
ADR R7,introd2
LDR R3,[R7,#0]
LDR R1,[R7,#1]
LDR R2,[R7,#2]
LDMFD R13!,{R15}
.fade3
STMFD R13!,{R14}
ADR R0,intro3
ADR R7,introd3
LDR R3,[R7,#0]
LDR R1,[R7,#1]
LDR R2,[R7,#2]
LDMFD R13!,{R15}
.fade4
STMFD R13!,{R14}
ADR R0,intro4
ADR R7,introd4
LDR R3,[R7,#0]
LDR R1,[R7,#1]
LDR R2,[R7,#2]
LDMFD R13!,{R15}
.fade5
STMFD R13!,{R14}
ADR R0,intro5
ADR R7,introd5
LDR R3,[R7,#0]
LDR R1,[R7,#1]
LDR R2,[R7,#2]
LDMFD R13!,{R15}
;**************
;* LONG DELAY *
;**************
;R0 - VSync
;R1 - Delay counter
; All registers preserved
ALIGN
.LDelay
STMFD R13!,{R0-R12,R14}
MOV R3,#LongDelay
._loop
MOV R0,#19
SWI OS_Byte
SUBS R3,R3,#1
BPL _loop
LDMFD R13!,{R0-R12,R15}
;****************
;* FADE UP/DOWN *
;****************
;R0 - Address of text
;R1 - X Pos
;R2 - Y Pos
;R3 - Length
;R4 - 0 = Fade down, 1 = Fade up
; All registers preserved
.FadeUpDown
STMFD R13!,{R0-R12,R14}
STR R0,texttemp
STRB R1,fx
STRB R2,fy
STRB R3,length
ADR R0,colourdata
ADD R0,R0,#2
STR R0,temp
CMP R4,#0
BEQ fadedown
.fadeup
BL MoveCursor
LDR R0,temp
LDRB R1,[R0,#0]
CMP R1,#255
BEQ finish
BL SetColour
BL SetTint
BL DisplayText
LDR R0,temp
ADD R0,R0,#2
STR R0,temp
B fadeup
.finish
LDMFD R13!,{R0-R12,R15}
.fadedown
LDR R0,temp
ADD R0,R0,#14
STR R0,temp
.loop2
BL MoveCursor
LDR R0,temp
LDRB R1,[R0,#0]
CMP R1,#255
BEQ finish
BL SetColour
BL SetTint
BL DisplayText
LDR R0,temp
SUB R0,R0,#2
STR R0,temp
B loop2
.MoveCursor
ADR R0,cursor
MOV R1,#3
SWI OS_WriteN
MOV R15,R14
.SetColour
STRB R1,col
ADR R0,setcolour
MOV R1,#2
SWI OS_WriteN
MOV R15,R14
.SetTint
LDR R0,temp
LDRB R1,[R0,#1]
STRB R1,colour2
ADR R0,tint
MOV R1,#10
SWI OS_WriteN
MOV R15,R14
.DisplayText
LDR R0,texttemp
LDRB R1,length
SWI OS_WriteN
MOV R0,#19
SWI OS_Byte
MOV R0,#19
SWI OS_Byte
MOV R0,#19
SWI OS_Byte
MOV R15,R14
;********
;* DATA *
;********
ALIGN
.colourdata ; Fade colour data
DCB $FF,$FF
DCB 0,0
DCB 0,64
DCB 0,128
DCB 0,192
DCB 21,0
DCB 21,64
DCB 21,128
DCB 21,192
DCB 42,0
DCB 42,64
DCB 42,128
DCB 42,192
DCB 63,0
DCB 63,64
DCB 63,128
DCB 63,192
DCB $FF,$FF
ALIGN
.set_mode
DCB 22,13,0 ; Set mode 13
ALIGN
.cursor ; Position cursor
DCB 31
.fx
DCB 0
.fy
DCB 0
ALIGN ; Set text colour
.setcolour
DCB 17
.col
DCB 0
ALIGN
.tint ; Set text tint
DCB 23,17,0
.colour2
DCB 0,0,0,0,0,0,0
ALIGN
.length ; Length of text
DCB 0
ALIGN
.temp
DCD 0
ALIGN
.texttemp
DCD 0
;**************
;* INTRO TEXT *
;**************
ALIGN
.intro1
DCB "Nicholas Kingsley Presents :"
ALIGN
.intro2
DCB "A Nicholas Kingsley Production"
ALIGN
.intro3
DCB "Starring :"
ALIGN
.intro4
DCB "You and a friend in"
ALIGN
.intro5
DCB "The Revenge Of OFUD"
;****************************
;* INTRO LENGTHS, X + Y POS *
;****************************
ALIGN
.introd1
DCB 26,6,yp
ALIGN
.introd2
DCB 30,4,yp
ALIGN
.introd3
DCB 10,14,yp
ALIGN
.introd4
DCB 19,10,yp
ALIGN
.introd5
DCB 19,10,yp
;*******************
;* SPRITE FILENAME *
;*******************
ALIGN
.filename
DCB "<Walker2$Dir>.INTRO.W2_INTRO",0
;********************
;* SPRITE POSITIONS *
;********************
ALIGN
.sx
DCD 0 ; X
ALIGN
.sy
DCD 0 ; Y/X2
;****************
;* SPRITE NAMES *
;****************
ALIGN
.spritename1
DCB "walker",0
ALIGN
.spritename2
DCB "i",0
;***************
;* SPRITE AREA *
;***************
ALIGN
.spritearea
DBB SpriteSize,0 ; Sprites are place here